<template>
    <view
        @tap="__e"
        @touchmove.stop.prevent="__e"
        class="mask data-v-0c0f4230"
        :data-event-opts="[
            ['tap', [['cancel', ['$event']]]],
            ['touchmove', [['', ['$event']]]]
        ]"
    >
        <view @tap.stop.prevent="__e" class="mask-content animated bounceInLeft data-v-0c0f4230" :data-event-opts="[['tap', [['', ['$event']]]]]">
            <text @tap.stop.prevent="__e" class="new-iconfont icon-close close-btn data-v-0c0f4230" :data-event-opts="[['tap', [['cancel', ['$event']]]]]"></text>
            <view class="title data-v-0c0f4230">{{ info.title }}</view>
            <view class="desc data-v-0c0f4230">当前登陆用户需要符合以下条件才能享受此秒杀价:</view>
            <view class="rule-c data-v-0c0f4230">
                <view class="item data-v-0c0f4230" v-if="options.vip.is_used">
                    <view class="key data-v-0c0f4230">已成为VIP会员</view>
                    <view class="status passed data-v-0c0f4230" v-if="options.vip.is_passed">已符合</view>
                    <block v-else>
                        <view @tap="__e" class="status un-passed data-v-0c0f4230" :data-event-opts="[['tap', [['toCheck', ['vip']]]]]">未符合</view>
                        <text class="new-iconfont icon-arrow-right data-v-0c0f4230"></text>
                    </block>
                </view>
                <view class="item data-v-0c0f4230" v-if="options.birthday.is_used">
                    <view class="key data-v-0c0f4230">已填写生日</view>
                    <view class="status passed data-v-0c0f4230" v-if="options.birthday.is_passed">已符合</view>
                    <block v-else>
                        <view @tap="__e" class="status un-passed data-v-0c0f4230" :data-event-opts="[['tap', [['toCheck', ['birthday']]]]]">未符合</view>
                        <text class="new-iconfont icon-arrow-right data-v-0c0f4230"></text>
                    </block>
                </view>
                <view class="item data-v-0c0f4230" v-if="options.phone.is_used">
                    <view class="key data-v-0c0f4230">已填写手机号</view>
                    <view class="status passed data-v-0c0f4230" v-if="options.phone.is_passed">已符合</view>
                    <block v-else>
                        <view @tap="__e" class="status un-passed data-v-0c0f4230" :data-event-opts="[['tap', [['toCheck', ['phone']]]]]">未符合</view>
                        <text class="new-iconfont icon-arrow-right data-v-0c0f4230"></text>
                    </block>
                </view>
                <view class="item data-v-0c0f4230" v-if="options.level_score.is_used">
                    <view class="key data-v-0c0f4230">{{ '成长值' + options.level_score.type + options.level_score.value }}</view>
                    <view class="status passed data-v-0c0f4230" v-if="options.level_score.is_passed">已符合</view>
                    <block v-else>
                        <view @tap="__e" class="status un-passed data-v-0c0f4230" :data-event-opts="[['tap', [['toCheck', ['level_score']]]]]">未符合</view>
                        <text class="new-iconfont icon-arrow-right data-v-0c0f4230"></text>
                    </block>
                </view>
                <view class="item data-v-0c0f4230" v-if="options.invitee_total.is_used">
                    <view class="key data-v-0c0f4230">{{ '邀请人数' + options.invitee_total.type + options.invitee_total.value + '人' }}</view>
                    <view class="status passed data-v-0c0f4230" v-if="options.invitee_total.is_passed">已符合</view>
                    <block v-else>
                        <view @tap="__e" class="status un-passed data-v-0c0f4230" :data-event-opts="[['tap', [['toCheck', ['invitee_total']]]]]">未符合</view>
                        <text class="new-iconfont icon-arrow-right data-v-0c0f4230"></text>
                    </block>
                </view>
                <view class="item data-v-0c0f4230" v-if="options.register_time.is_used">
                    <view class="key data-v-0c0f4230">{{ '注册时间' + options.register_time.type + options.register_time.value + '小时' }}</view>
                    <view class="status passed data-v-0c0f4230" v-if="options.register_time.is_passed">已符合</view>
                    <block v-else>
                        <view @tap="__e" class="status un-passed data-v-0c0f4230" :data-event-opts="[['tap', [['toCheck', ['register_time']]]]]">未符合</view>
                        <text class="new-iconfont icon-arrow-right data-v-0c0f4230"></text>
                    </block>
                </view>
                <view class="item data-v-0c0f4230" v-if="options.score.is_used">
                    <view class="key data-v-0c0f4230">{{ scoreAlias + '数量' + options.score.type + options.score.value }}</view>
                    <view class="status passed data-v-0c0f4230" v-if="options.score.is_passed">已符合</view>
                    <block v-else>
                        <view @tap="__e" class="status un-passed data-v-0c0f4230" :data-event-opts="[['tap', [['toCheck', ['score']]]]]">未符合</view>
                        <text class="new-iconfont icon-arrow-right data-v-0c0f4230"></text>
                    </block>
                </view>
            </view>
            <view class="price-c data-v-0c0f4230" v-if="isInit">
                <text class="text key-text data-v-0c0f4230">秒杀价:</text>
                <price-display @__l="__l" class="data-v-0c0f4230" :info="info" vueId="f7843db8-1"></price-display>
            </view>
            <view class="btn-c data-v-0c0f4230">
                <button @tap="__e" class="btn cancel bg-purple data-v-0c0f4230" :data-event-opts="[['tap', [['cancel', ['$event']]]]]">再看看</button>
                <button
                    @tap="__e"
                    :class="['btn', 'submit', 'data-v-0c0f4230', isPassed ? 'bg-yellow' : '', !isPassed ? 'bg-gray' : '']"
                    :data-event-opts="[['tap', [['submit', ['$event']]]]]"
                >
                    秒杀价购买
                </button>
            </view>
        </view>
    </view>
</template>

<script>
import priceDisplay from '@/components/PriceDisplay/PriceDisplay';
import tabBar from '@/components/TabBar/tabBar';
(global.webpackJsonp = global.webpackJsonp || []).push([
    ['components/SeckillPriceCheck/SeckillPriceCheck'],
    {
        '5b7b': function (e, t, i) {
            'use strict';

            i.r(t);
            var n = i('faed');
            var c = i.n(n);
            for (var o in n) {
                if (['default'].indexOf(o) < 0) {
                    (function (e) {
                        i.d(t, e, function () {
                            return n[e];
                        });
                    })(o);
                }
            }
            t.default = c.a;
        },
        '68c0': function (e, t, i) {
            'use strict';

            i.d(t, 'b', function () {
                return c;
            });
            i.d(t, 'c', function () {
                return o;
            });
            i.d(t, 'a', function () {
                return n;
            });
            var n = {
                PriceDisplay: function () {
                    return i.e('components/PriceDisplay/PriceDisplay').then(i.bind(null, '6b05'));
                }
            };
            var c = function () {
                this.$createElement;
                this._self._c;
            };
            var o = [];
        },
        '770c': function (e, t, i) {
            'use strict';

            var n = i('c6ff');
            i.n(n).a;
        },
        b6b5: function (e, t, i) {
            'use strict';

            i.r(t);
            var n = i('68c0');
            var c = i('5b7b');
            for (var o in c) {
                if (['default'].indexOf(o) < 0) {
                    (function (e) {
                        i.d(t, e, function () {
                            return c[e];
                        });
                    })(o);
                }
            }
            i('770c');
            var a = i('f0c5');
            var s = Object(a.a)(c.default, n.b, n.c, false, null, '0c0f4230', null, false, n.a, void 0);
            t.default = s.exports;
        },
        c6ff: function (e, t, i) {},
        faed: function (e, t, i) {
            'use strict';

            (function (e) {
                Object.defineProperty(t, '__esModule', {
                    value: true
                });
                t.default = void 0;
                var i = {
                    components: {},
                    data: function () {
                        return {
                            info: {},
                            isPassed: 0,
                            options: {
                                vip: {},
                                birthday: {},
                                phone: {},
                                level_score: {},
                                invitee_total: {},
                                register_time: {},
                                score: {}
                            },
                            isInit: false
                        };
                    },
                    props: {
                        seckillUuid: {
                            type: String
                        }
                    },
                    computed: {},
                    watch: {},
                    created: function () {
                        this.initOrder();
                    },
                    methods: {
                        toCheck: function (t) {
                            var i = {
                                phone: '/pages/myProfile/index',
                                vip: '/pages/buyVip/index',
                                birthday: '/pages/myProfile/index',
                                score: '/pages/myScore/index',
                                register_time: '/pages/center/detail',
                                level_score: '/pages/center/detail',
                                invitee_total: '/pages/myInvitees/index'
                            }[t];
                            e.navigateTo({
                                url: i
                            });
                        },
                        initOrder: function () {
                            var that = this;
                            e.showLoading();
                            this.$http('/seckills/'.concat(this.seckillUuid, '/check-user-group'), 'POST').then(function (i) {
                                that.isInit = true;
                                that.info = i.data.info;
                                that.options = i.data.options;
                                that.isPassed = i.data.is_passed;
                                e.hideLoading();
                            });
                        },
                        cancel: function () {
                            this.$emit('cancel');
                        },
                        submit: function () {
                            if (!this.isPassed) {
                                e.showToast({
                                    title: '暂不符合购买条件~',
                                    icon: 'none'
                                });
                                return false;
                            }
                            this.$emit('buy', this.info);
                        },
                        toPage: function (t) {
                            e.navigateTo({
                                url: t
                            });
                        }
                    }
                };
                t.default = i;
            }.call(this, i('543d').default));
        }
    }
]);
(global.webpackJsonp = global.webpackJsonp || []).push([
    'components/SeckillPriceCheck/SeckillPriceCheck-create-component',
    {
        'components/SeckillPriceCheck/SeckillPriceCheck-create-component': function (e, t, i) {
            i('543d').createComponent(i('b6b5'));
        }
    },
    [['components/SeckillPriceCheck/SeckillPriceCheck-create-component']]
]);
</script>
<style>
@import './SeckillPriceCheck.css';
</style>
